package org.zcl.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.zcl.filter.ApiFilter;

/**
 * @author zhuchenglin
 * @since 2022/9/6 16:08
 */
@Configuration
public class WebConfiguration {

    @Bean
    public FilterRegistrationBean<ApiFilter> apiFilterRegistrationBean() {
        FilterRegistrationBean<ApiFilter> registrationBean = new FilterRegistrationBean<>();
        registrationBean.setFilter(new ApiFilter());
        return registrationBean;
    }
}
